using Gateway.Domain.EFCore.Configuration;
using Gateway.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Gateway.Domain.Configuration;

public class DescribeDomainConfiguration : AggregateRootEntityConfiguration<DescribeDomain>
{
    public override void Configure(EntityTypeBuilder<DescribeDomain> builder)
    {
        builder.ToTable(t => t.HasComment("阿里的域名解析表"));
        builder.Property(x => x.DomainName).HasMaxLength(500);
        builder.Property(x => x.DomainId).HasMaxLength(100);
        builder.Property(x => x.AliDomain);
        builder.Property(x => x.InstanceEndTime).HasMaxLength(100);
        builder.Property(x => x.InstanceExpired).HasMaxLength(100);
        builder.Property(x => x.DnsServers).HasMaxLength(500);
        builder.Property(x => x.Endpoint).HasMaxLength(500);
        base.Configure(builder);
    }
}